 #include "lpc17xx_i2c.h"

 #ifndef CHECKSUM_H
 #define CHECKSUM_H

 /**
  *	Checks if the data provided constructs to a checksum that matches the checksum provided.
  *
  * @param data The data to use to construct the checksum
  * @param length The total number of bytes of data
  * @param checksum The checksum byte to compare
  *
  * @return 0 if the checksum is invalid, 1 if the checksum is valid
  */
 uint8_t isValidChecksum(uint8_t *data, uint8_t length, uint8_t checksum);

 /**
  *	Creates a new checksum byte using the provided data.
  * 
  * @param data The data to use for the checksum
  * @param length The total number of bytes of data
  *
  * @return The resulting checksum byte
  */
 uint8_t constructChecksum(uint8_t *data, uint8_t length);

 #endif
